<?php

class hdms_userModel extends FoundryModel
{
	protected $hasOne = array(
		'group',
	);
	
	protected $afterFind	= 'postFind';

	/**
	 * init()
	 *
	 * init() is called in place of the __construct() method used by the
	 * FoundryModel super class
	 * This function will be called immediately after the __construct method
	 *
	 */ 
	public function init()
	{
	
	
	}
	
	public function postFind( $data )
	{
		for( $i=0; $i<count( $data ); $i++ ) {
		
			if( $data[$i]['group_role'] !== '1' ) {
				$data[$i]['group_role'] = unserialize( $data[$i]['group_role'] );
			}
		
		}
	}


}

?>